Other Global Variables
The following global variables are available globally.
-
Key used for accessing a
Bool
as to whether the reroute occurced because a faster route was found.Declaration
Swift
public let RouteControllerDidFindFasterRouteKey = MBRouteControllerDidFindFasterRouteKey
-
Key for accessing the
RouteProgress
key emitted whenRouteControllerDidPassSpokenInstructionPoint
is fired.Declaration
Swift
public let RouteControllerDidPassSpokenInstructionPointRouteProgressKey = MBRouteControllerDidPassSpokenInstructionPointRouteProgressKey
-
:nodoc This is used internally for debugging metrics
Declaration
Swift
public var NavigationMetricsDebugLoggingEnabled = "MBNavigationMetricsDebugLoggingEnabled"
-
For shorter upcoming steps, we link the
AlertLevel.high
instruction. If the upcoming step duration is near the duration ofRouteControllerHighAlertInterval
, we need to apply a bit of a buffer to prevent back to back notifications.A multiplier of
1.2
gives us a buffer of 3 seconds, enough time insert a new instruction.Declaration
Swift
public let RouteControllerLinkedInstructionBufferMultiplier: Double = 1.2
-
The minimum speed value before the user’s actual location can be considered over the snapped location.
Declaration
Swift
public var RouteControllerMinimumSpeedForLocationSnapping: CLLocationSpeed = 3
-
The minimum distance threshold used for giving a
Continue
type instructions.Declaration
Swift
public var RouteControllerMinimumDistanceForContinueInstruction: CLLocationDistance = 2_000
-
The minimum distance in the opposite direction of travel that triggers rerouting.
Declaration
Swift
public var RouteControllerMinimumBacktrackingDistanceForRerouting: CLLocationDistance = 50
-
Minimum number of consecutive location updates moving backwards before the user is rerouted.
Declaration
Swift
public var RouteControllerMinimumNumberLocationUpdatesBackwards = 3
-
Number of seconds reroute feedback sections are shown in the feedback view after the user is rerouted.
Declaration
Swift
public var RouteControllerNumberOfSecondsForRerouteFeedback: TimeInterval = 10
-
The number of seconds between attempts to automatically calculate a more optimal route while traveling.
Declaration
Swift
public var RouteControllerOpportunisticReroutingInterval: TimeInterval = 120
-
The number of seconds remaining on the final step of a leg before the user is considered
arrived
.Declaration
Swift
public var RouteControllerDurationRemainingWaypointArrival: TimeInterval = 3